<?php
	// jalankan perintah cek pulsa via gammu
	set_time_limit (90);
	exec("c:\gammu\bin -c c:\gammu\bin\gammurc getussd *555#", $hasil);

	// proses filter hasil output
	while ($hasil != "") {
		for ($i=0; $i<=count($hasil)-1; $i++)
		{
		   if (substr_count($hasil[$i], 'Service reply') > 0) $index = $i;
		}

		// menampilkan sisa pulsa
		echo $hasil[$index];
		# code...
	}

	// system("cmd /c C:\Gammu\yes.bat");
?>

